chore: resolve macros/derived-traits from crates w/ scopes rather than globally #2198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
i.e. remove depreciated use of
#[macro_import] extern crate
to make this more sane for reviewing, I did commits by crate. (and can confirm that each one builds cleanly)
I'm pretty sure the
contracts
,eyre
,indoc
, andstrum
ones are worth taking for overall clarity-of-provenance.I have more mixed feelings on the utility of scoping
pretty_assertions
andinsta
assertions.I, in fact, tried (at least) doing:
in
src/test.rs
and then it was gonna e.g.use crate::test::*
or similar (crate::test::assertions::*
?), but that made stuff angry about possible ambiguity (based on implications/expansion of#[test]
?)The "correct" way to do this, I think, then is to rather overrider/replace the
#[test]
attribute itself with e.g. a#[mise_test]
(for the insta ones maybe a#[snapshot_test]
) or similarI was working on a larger refactor
(trying to disentangle the
cli
— in particularForgeArg
,ToolArg
,ToolVersionType
(to limit down cli-layer usage to the FromStr-ing?);ui
(SingleReport
andTreeItem
traits) and most of theenv
crates from the rest, with a view towards maybe doing a separatelib.rs
and minimalmain.rs
)but I wore myself out and stepped back to start with offering this [and now probably lose interest for at least several days]
¯\(ツ)/¯